package com.hlhj.carview.adapter

import android.widget.ImageView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.hlhj.carview.LoadtNet
import com.hlhj.carview.R
import com.hlhj.carview.bean.BorrowCarListBean

/**
 *NeverMore
 *2020/9/11
 **/
class BCarListAdp(private val datas:ArrayList<BorrowCarListBean.Data>):BaseQuickAdapter<BorrowCarListBean.Data,BaseViewHolder>(R.layout.borrow_car_item,datas) {
    override fun convert(helper: BaseViewHolder?, item: BorrowCarListBean.Data?) {
        helper?.getView<ImageView>(R.id.itemIcon)?.LoadtNet(item?.icon?:"")
        helper?.setText(R.id.itemName,item?.name)
        helper?.setText(R.id.itemType,"货车类型:${item?.type}")
        helper?.setText(R.id.itemLevel,"货车级别：${item?.carLevel}")
        helper?.setText(R.id.itemPhone,item?.phone)

    }
}